]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Improve accessibility of the icon label buttons
authorLukáš Tyrychtr <ltyrycht@redhat.com>
Fri, 26 Sep 2025 15:35:20 +0000 (17:35 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 9 Dec 2025 16:10:40 +0000 (17:10 +0100)
Set the label actor properly so the buttons have a label.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3893>

js/ui/screenshot.js

index 60dedd68b7bd40d981139556c6cd142317cecf58..c1d2f53753eab9a4278e1c447f3a835b3aa0f2aa 100644 (file)
@@ -62,10 +62,12 @@ class IconLabelButton extends St.Button {
         this.set_child(this._container);
 
         this._container.add_child(new St.Icon({icon_name: iconName}));
-        this._container.add_child(new St.Label({
+        const labelActor = new St.Label({
             text: label,
             x_align: Clutter.ActorAlign.CENTER,
-        }));
+        });
+        this.set({labelActor});
+        this._container.add_child(labelActor);
     }
 });